const fs = require("fs");

var readStraem = fs.createReadStream("./data/input.txt");

var count = 0;
var str = "";
readStraem.on("data",(data)=>{
    str += data;
    count++;
})

readStraem.on("end",()=>{
    console.log(str);
    console.log(count);
})

readStraem.on("error",(err)=>{
    console.log(err);
    console.log(count);
})